package com.project.mapper;

import com.github.pagehelper.PageInfo;
import com.project.bean.RecordBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface IRecordMapper {
    /**
     * 添加日志
     * @param record
     */
    @Insert("INSERT INTO t_record(c_date,c_info) values(#{date},#{info})")
    public void addRecord(RecordBean record);

    /**
     * 动态查询
     * @param startDate 起止日期
     * @param endDate 结束日期
     * @return 日志集合
     */
    public List<RecordBean> findByDate(@Param("startDate") LocalDate startDate,
                                       @Param("endDate") LocalDate endDate);
}
